﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using System;
using NJamb.Parser.Subjects.Singular;
using NUnit.Framework;
using Stile.Types;
#endregion

namespace NJamb.Tests.Parser.Subjects.Singular
{
    [TestFixture]
    public class SingularSubjectFixture
    {
        private Lazy<string> _lazyDescription;
        private SingularSubject<string> _testSubject;

        [SetUp]
        public void SetUp()
        {
            _lazyDescription = "bar".ToLazy();
            _testSubject = new SingularSubject<string>(() => "foo", _lazyDescription);
        }

        [Test]
        public void InitialValues()
        {
            Assert.That(_testSubject.LazyDescription, Is.SameAs(_lazyDescription));
            Assert.That(_testSubject.LazyDescription.IsValueCreated, Is.False);
        }
    }
}
